package com.example.supplychainbackend.controller.dto.quality;

import jakarta.persistence.CascadeType;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToMany;
import lombok.*;

import java.util.List;

@Data
@Builder
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class InspectionRequestDto {
    private String inspectionRequestNumber;

    private Integer inspectionType;
    private Integer referenceDocumentType;
    private String referenceDocumentNumber;
    private String externalDocumentNumber;
    private String containerNumber;
    private Integer inspectionQuantity;
    private Integer inspectionMethod;
    private String samplingStandard;
    private String contractNumber;
    private String contractName;
    private String salesOrderNumber;
    private String salesOrderName;

    private Integer sourceDocumentType;
    private String sourceDocumentNumber;
    private String sourceDocumentLineNumber;

    private String materialNumber;
    private String materialName;
    private String materialDesc;
    private String manufacturer;
    private String manufacturerMaterialCode;
    private String supplierCode;
    private String supplierName;
    private String requestDepartment;
    private String requestor;
    private String requestTime;

    private String batchNumber;

    private String inspector;
    private String inspectionDepartment;
    private String inspectionOrderNumber;

    private Integer status;


    @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
    @JoinColumn(name = "inspection_request_number")
    private List<InspectionRequestItemDto> inspectionItems;

    String	userName;
    String	enterpriseName;
    Boolean	onChain;
    String	transactionId;
    String	commitTime;
    String	userId;
    String	enterpriseId;
}
